.ng-date-picker {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: #333;
  user-select: none;
  min-width: 220px;

  * {
    box-sizing: border-box;
  }

  &__input {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px 34px 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;

    &:hover {
      border-color: #40a9ff;
    }
  }

  &__placeholder {
    color: #bfbfbf;
  }

  &__value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &__icon {
    position: absolute;
    right: 10px;
    font-size: 16px;
    pointer-events: none;
  }

  &__clear {
    position: absolute;
    right: 28px;
    font-weight: 600;
    font-style: normal;
    cursor: pointer;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s;

    &:hover {
      color: #333;
    }
  }

  &:hover &__clear {
    opacity: 1;
  }

  &__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1050;
    width: 280px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    padding: 12px;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  &__nav {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    transition: background-color 0.2s;

    &:hover {
      background-color: #f0f0f0;
    }
  }

  &__month {
    font-weight: 600;
    color: #333;
  }

  &__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
    font-size: 12px;
    color: #999;
    text-align: center;
  }

  &__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  &__day {
    border: none;
    background-color: transparent;
    border-radius: 4px;
    height: 32px;
    line-height: 32px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;

    &:hover {
      background-color: #e6f7ff;
      color: #1890ff;
    }
  }

  &__day--outside {
    color: #bbb;
  }

  &__day--today {
    border: 1px solid #1890ff;
  }

  &__day--selected {
    background-color: #1890ff;
    color: #fff;

    &:hover {
      background-color: #40a9ff;
      color: #fff;
    }
  }

  &__day--disabled {
    color: #d0d0d0;
    cursor: not-allowed;

    &:hover {
      background-color: transparent;
      color: #d0d0d0;
    }
  }

  &__footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  &__footer-btn {
    border: none;
    background-color: #f5f5f5;
    color: #555;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;

    &:hover {
      background-color: #e6f7ff;
      color: #1890ff;
    }
  }

  &--disabled {
    pointer-events: none;

    .ng-date-picker__input {
      background-color: #f5f5f5;
      color: #999;
    }
  }
}

.ng-date-picker__panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.ng-date-picker__panel::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 3px;
}
